<?php

  require_once "function.php";

  $url="http://intra.mc.ntu.edu.tw/new_digreport/report_menu.asp?chartno=".$_GET['id']."&durnum=1&dattype=M";
  $dom=ntuhDom($url);
  foreach($dom->getElementsByTagName('param') as $element){
      if(substr_count($element->getAttribute('name'),'OP_FOLD')>=1&&substr_count($element->getAttribute('name'),"TEXT")>=1&&substr_count($element->getAttribute('value'),'手術紀錄')==0){
        echo '<a href="http://172.16.38.1/'.$element->nextSibling->nextSibling->getAttribute('value').'">'.$element->getAttribute('value')."</a><br>";
      }
  }

?>
